/*
 * Copyright 2013 Agustina Martinez-Garcia

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
 */
package uk.ljmu.qudexapps.manager.utilities;


public class Constants {
	public static final String PID_HEADER = "PID";
	public static final String DC_FORMAT_HEADER = "dc:format";
	public static final CharSequence DS_INLINE = ":X";
	public static final CharSequence DS_MANAGED = ":M";
	public static final CharSequence DS_EXTERNAL = ":E";
	public static final String DEFAULT_DS_MANAGED_NAME = "DATA:M";
	public static final String LABEL_HEADER = "ex:label";
	public static final String EMAIL_DEFAULT_ADDRESS = "ensemblesupport@ljmu.ac.uk";
	public static final String SUBJECT_EMAIL = "Auto-generated message: Ensemble QuDex Repository";
	public static final long FILE_MAX_MEM_SIZE = 10240;
	//TO COPE WITH SPRING'S temporary file management when uploading files bigger than a 1MB
	public static String GET_FILES;
	
	static {
		StringBuilder sb = new StringBuilder();
	
		sb.append("PREFIX dc: <http://purl.org/dc/elements/1.1/>");
		sb.append("PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ");
		sb.append("PREFIX rel: <info:fedora/fedora-system:def/relations-external#> ");
		sb.append("SELECT ?id ?title ");
		sb.append("FROM<$GRAPH$> ");
		sb.append("WHERE { ");
		sb.append("?id a <http://example.org/File>; ");
		sb.append("rel:isParOf <$COL_ID$>");
		sb.append("optional { ?id dc:title ?title. } "); 
		sb.append("}");
		GET_FILES = sb.toString();
		sb.delete(0,  sb.length());
	}
}
